﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DXApplicationTangche.Utils
{
    public class ValueUtil
    {
        public static String StringNullValue(String nullValue)
        {
            return String.IsNullOrEmpty(nullValue) ? "" : nullValue;
        }
        public static Double StringToDouble(String nullValue)
        {
            try
            {
                return double.Parse(nullValue);
            }
            catch
            {
                return 0.0;
            }
        }
        public static int StringToInt(String nullValue)
        {
            try
            {
                return Convert.ToInt32(nullValue);
            }
            catch
            {
                return 0;
            }
        }
        
    }
}
